from selenium import  webdriver
from  time import sleep
# r防止转译
driver=webdriver.Chrome(r'./chromedriver.exe')
# 打开百度
driver.get('http://www.baidu.com')
sleep(2)
print(len(driver.find_elements_by_link_text(str(u"设置".encode('utf-8')))))
driver.find_elements_by_link_text(str(u"设置".encode('utf-8')))[0].click()

# driver.find_element_by_xpath('//*[@id="s-usersetting-top"]').click()
sleep(2)
driver.find_elements_by_link_text('搜素设置')[0].click()

